// 返回值
export interface IRes<T> {
    flag: number
    data: T
    message: string
    timestamp: number
    responseTime: string
}
// 登录
export interface ILogin {
    phone: string
    smsCode: string
    devid: string
    devName: string
}
export interface ICTU {
    id?: number
    ct?: string
    ut?: string
    au?: string
    ed?: string
}
// 用户资料注入
export interface IBodyUser {
    __user?: IUserinfo
    __ip?: string
    __token?: string
}
// 分页参数
export interface IPagesOption {
    current: number
    pageSize: number
}

// 验证码配置
export interface ISmsCodeOption {
    phone: string
    validityTime?: number
}
// 验证码校验
export interface ISmsCodeCheck {
    phone: string
    code: string
    consumption?: number
}

export interface IMqtt {
    id: string
    data: Record<string, any>
}
/**
 * 用户资料
 */
export interface IUserinfo extends ICTU {
    userid?: string
    companyid?: string
    phone?: string
    account?: string
    password?: string
    name?: string
    sex?: number
    avatar?: string
    userno?: string
    birthday?: string
    note?: string
    status?: number
    role?: string[]
    company?: ICompany
}
/**
 * 企业资料
 */
export interface ICompany extends ICTU {
    companyid?: string
    companyName?: string
    companyFullName?: string
    companyUrl?: string
    companyStatus?: number
    companyType?: number
    project?: IProject
}
/**
 * 版本管理
 */
export interface IRepo extends ICTU {
    repoid?: string
    repoName?: string
    repoPath?: string
    repoRepo?: string
    flow?: IFlow
}
export interface IBranch extends ICTU {
    branchid?: string
    branch?: string
    branchCur?: string
    companyid?: string
    company?: ICompany
}
export interface IVersion extends ICTU {
    versionid?: string
    version?: string
    context?: string
    branch?: IBranch
    project?: IProject
    company?: ICompany
    repo?: IRepo[]
}
export interface IFlow extends ICTU {
    flow?: string
    branchid?: string
    repoid?: string
    versionid?: string
    projectid?: string
    isUpdata?: boolean
}
/**
 * 项目管理
 */
export interface IProject extends ICTU {
    projectid?: string
    projectName?: string
    projectType?: number
    projectStatus?: number
}

/**
 * 语雀文档
 */
export type IYuqueBook = {
    id: number
    type: string
    slug: string
    name: string
    user_id: number
    description: string
    creator_id: number
    public: number
    items_count: number
    likes_count: number
    watches_count: number
    content_updated_at: string
    updated_at: string
    created_at: string
    user: any
    _serializer: string
}
export type IYuqueUser = {
    id: number
    type: string
    login: string
    name: string
    description: string
    avatar_url: string
    books_count: number
    public_books_count: number
    followers_count: number
    following_count: number
    created_at: string
    updated_at: string
    _serializer: string
}
export type IYuqueDoc = {
    id: string
    slug: string
    title: string
    book_id: number
    book: IYuqueBook
    user_id: number
    user: IYuqueUser
    format: string
    body: string
    body_draft: string
    body_html: string
    public: number
    status: number
    view_status: number
    read_status: number
    likes_count: number
    comments_count: number
    content_updated_at: string
    deleted_at: string
    created_at: string
    updated_at: string
    published_at: string
    first_published_at: string
    word_count: number
    path: string
    publish: boolean
    action_type: string
    webhook_subject_type: string
    actor_id: number
    _serializer: string
}
